cmake_minimum_required(VERSION 3.20)
project(FileBackup)

# 设置C++标准为C++20
set(CMAKE_CXX_STANDARD 20) 
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# 在编译时链接 stdc++fs
add_compile_options(-lstdc++fs)

# 设置构建类型为 Release
set(CMAKE_BUILD_TYPE Release) 
# add_compile_options(-g)      # 添加-g选项以生成调试信息
# add_compile_options(-O0)     # 添加-O0选项以禁用优化

set(EXE_FILE_NAME fbk)
set(FILE_BACKUP_PROJECT_ROOT ${CMAKE_CURRENT_SOURCE_DIR})

aux_source_directory(./src SOURCE_FILES)
include_directories(./include)

add_executable(${EXE_FILE_NAME} ${SOURCE_FILES})

# 运行 `make install` 命令，将执行程序安装到 bin 目录下
install(TARGETS ${EXE_FILE_NAME} DESTINATION bin) 